const { DataTypes } = require("sequelize");
const sequelize = require("../config/sequelize");

const Food = sequelize.define(
  "Food",
  {
    foodcate: {
      type: DataTypes.STRING,
      comment: "食物分类",
    },
    name: {
      type: DataTypes.STRING,
      comment: "食物名称",
    },
    img: {
      type: DataTypes.STRING,
      comment: "食物图片",
    },
    alias: {
      type: DataTypes.STRING,
      comment: "食物别名",
    },
    heat_cal: {
      type: DataTypes.STRING,
      comment: "食物热量",
    },
    "热量(大卡)": {
      type: DataTypes.STRING,
    },
    "碳水化合物(克)": {
      type: DataTypes.STRING,
    },
    "脂肪(克)": {
      type: DataTypes.STRING,
    },
    "蛋白质(克)": {
      type: DataTypes.STRING,
    },
    "纤维素(克)": {
      type: DataTypes.STRING,
    },
    "维生素A(微克)": {
      type: DataTypes.STRING,
    },
    "维生素B1(毫克)": {
      type: DataTypes.STRING,
    },
    "维生素B2(毫克)": {
      type: DataTypes.STRING,
    },
    "维生素B3(毫克)": {
      type: DataTypes.STRING,
    },
    "胆固醇(毫克)": {
      type: DataTypes.STRING,
    },
    "维生素C(毫克)": {
      type: DataTypes.STRING,
    },
    "维生素E(毫克)": {
      type: DataTypes.STRING,
    },
    "叶酸(微克)": {
      type: DataTypes.STRING,
    },
    "胡萝卜素(微克)": {
      type: DataTypes.STRING,
    },
    "钙(毫克)": {
      type: DataTypes.STRING,
    },
    "磷(毫克)": {
      type: DataTypes.STRING,
    },
    "钾(毫克)": {
      type: DataTypes.STRING,
    },
    "钠(毫克)": {
      type: DataTypes.STRING,
    },
    "镁(毫克)": {
      type: DataTypes.STRING,
    },
    "铁(毫克)": {
      type: DataTypes.STRING,
    },
    "锌(毫克)": {
      type: DataTypes.STRING,
    },
    "铜(毫克)": {
      type: DataTypes.STRING,
    },
    "锰(微克)": {
      type: DataTypes.STRING,
    },
    "硒(微克)": {
      type: DataTypes.STRING,
    },
  },
  {
    // 这是其他模型参数
    sequelize: sequelize,
    tableName: "food",
    timestamps: false, //关闭时间戳
  }
);


module.exports = Food;
